package Work5;

public class Scientist extends Work{
    double yearMoney;

    public Scientist(String name, double money, double yearMoney) {
        super(name, money);
        this.yearMoney = yearMoney;
    }

    @Override
    public void print() {
        System.out.println(getName()+" 工资:"+getMoney()+yearMoney);
    }
}
